package com.nodecollege.cloud.client.fallback;

import com.nodecollege.cloud.client.feign.FriendClient;
import com.nodecollege.cloud.common.model.NCResult;
import com.nodecollege.cloud.common.model.QueryVO;
import com.nodecollege.cloud.common.model.po.UpmsUserFriend;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author LC
 * @date 2020/1/10 9:50
 */
@Slf4j
@Component
public class FriendClientFallback implements FriendClient {

    @Override
    public NCResult<UpmsUserFriend> getFriendList(@RequestBody QueryVO<UpmsUserFriend> queryVO) {
        String message = "upms-getFriendList 获取好友列表失败！中台熔断器——调用接口出现异常！";
        log.error(message);
        return NCResult.error("-1", message);
    }
}
